<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>

    /*JavaScript(es5)没有块级作用域*/

    for (var i=0;i<5;i++){

      //  console.log(i);
    }

    console.log(i);
</script>
</html>